﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using ScenarioFramework.WorkflowEngine.DataModel.WorkflowParticipantsData;
using ScenarioFramework.Tools.UI.Controls.ListControls.ListItem;

namespace ScenarioFramework.Tools.UI.Controls.ListControls
{
    public partial class UserComboBox : ComboBox
    {
        public UserComboBox()
        {
            InitializeComponent();

            this.LoadUsers();
        }

        private void LoadUsers()
        {
            XMLUsers xmlUsers = WAPI.User.GetUsers();

            foreach (XMLUser user in xmlUsers)
            {
                this.Items.Add( new UserComboItem(user) );
            }

            this.Enabled = true;
        }
    }
}
